load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

go_library(
    name = "go_default_library",
    srcs = [
        "metrics_reporter.go",
        "persistence_worker.go",
        "swf_saver.go",
        "workflow_saver.go",
    ],
    importpath = "github.com/kubeflow/pipelines/backend/src/agent/persistence/worker",
    visibility = ["//visibility:public"],
    deps = [
        "//backend/api:go_default_library",
        "//backend/src/agent/persistence/client:go_default_library",
        "//backend/src/common/util:go_default_library",
        "@com_github_argoproj_argo//pkg/apis/workflow/v1alpha1:go_default_library",
        "@com_github_golang_protobuf//jsonpb:go_default_library_gen",
        "@com_github_sirupsen_logrus//:go_default_library",
        "@io_k8s_apimachinery//pkg/util/runtime:go_default_library",
        "@io_k8s_client_go//plugin/pkg/client/auth/gcp:go_default_library",
        "@io_k8s_client_go//tools/cache:go_default_library",
        "@io_k8s_client_go//util/workqueue:go_default_library",
    ],
)

go_test(
    name = "go_default_test",
    srcs = [
        "metrics_reporter_test.go",
        "persistence_worker_test.go",
        "swf_saver_test.go",
        "workflow_saver_test.go",
    ],
    embed = [":go_default_library"],
    deps = [
        "//backend/api:go_default_library",
        "//backend/src/agent/persistence/client:go_default_library",
        "//backend/src/common/util:go_default_library",
        "//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
        "@com_github_argoproj_argo//pkg/apis/workflow/v1alpha1:go_default_library",
        "@com_github_stretchr_testify//assert:go_default_library",
        "@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
        "@io_k8s_apimachinery//pkg/types:go_default_library",
        "@io_k8s_client_go//plugin/pkg/client/auth/gcp:go_default_library",
        "@io_k8s_client_go//tools/cache:go_default_library",
    ],
)
